<!--
- @founder   IT柏拉图, https: //weibo.com/itprato
- @author    DedeCMS团队
- @copyright Copyright (c) 2007 - 2021, 上海卓卓网络科技有限公司 (DesDev, Inc.)
--->

<html>
<head>
<meta charset="{dede:global.cfg_soft_lang/}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>新建采集节点</title>
<meta name="copyright" content="2007-2021 DedeCMS, 上海卓卓网络科技有限公司 (DesDev, Inc.)" />
<link rel="icon" href="/favicon.ico" />
<!-- CSS FILES -->
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/pkg/uikit/css/uikit.min.css" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/css/manage.dede.css">
<style type="text/css">
.uk-table td{
padding: 6px 12px;
vertical-align: top;
height: 35px;
}
</style>
</head>
<body>
<!-- 列表头部 -->
<div id="Table_Header_202X2W2X1X292F" class="uk-card uk-card-small uk-card-default" uk-sticky="bottom: #offset">
<div id="Header_1W2T2S2T1V252B" class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small">
<span><ul class="uk-breadcrumb"><li><a href="co_main.php">采集节点管理</a></li><li><span>新建采集节点</span></li><li><span>设置基本信息及网址索引页规则</span></li></ul></span>
</div>
</div>
</div>
<!-- /列表头部 -->
<!-- 列表主体 -->
<div class="uk-card uk-card-small uk-card-default" style="top:-20px;margin-bottom: 50px;">
<div class="uk-card-body uk-overflow-auto" grid>
<div class="uk-child-width-1-1 uk-padding">
<table width="98%" border="0" cellpadding="1" cellspacing="1" class="uk-table">
<form name="form1" method="post" action="co_add.php">
<input type="hidden" name="channelid" value="<?php echo $channelid; ?>"/>
<input type="hidden" name="step" value="2"/>
<input type="hidden" name="dopost" value="test"/>
<!-- 选项 -->
<tr>
<td><b>节点基本信息</b></td>
<td></td>
</tr>
<tr>
<td width="18%" height="24">节点名称：</td>
<td><input name="notename" type="text" class="uk-input uk-form-small uk-form-width-large" id="notename"/></td>
</tr>
<tr>
<td width="18%">目标页面编码：</td>
<td>
<input type="radio" class="uk-radio" name="sourcelang" id='language1' value="gb2312" checked='1' />
GB2312 &nbsp;&nbsp;
<input type="radio" class="uk-radio" name="sourcelang" id='language2' value="utf-8" />
UTF8 &nbsp;&nbsp;
<input type="radio" class="uk-radio" name="sourcelang" id='language3' value="big5" />
BIG5
</td>
</tr>
<tr>
<td height="24">区域匹配模式：</td>
<td>
<input type="radio" class="uk-radio" name="macthtype" value="regex" />
正则表达式 &nbsp;&nbsp;
<input name="macthtype" type="radio" class="uk-radio" value="string" checked='1' />
字符串
</td>
</tr>
<tr>
<td>内容导入顺序：</td>
<td>
<input type="radio" class="uk-radio" name="cosort" id="cosort1" value="asc" checked='1' />
与目标站一致 &nbsp;&nbsp;
<input type="radio" class="uk-radio" name="cosort" id="cosort2" value="desc" />
与目标站相反
</td>
</tr>
<tr>
<td height="24" colspan="2">以下选项仅在开启防盗链模式才需设定，如果目标网站没有防盗链功能请不要开启，否则会降低采集速度。</td>
</tr>
<tr>
<td height="24">防盗链模式：</td>
<td>
<input name="isref" type="radio" class="uk-radio" value="no" checked='1' />
不开启 &nbsp;&nbsp;
<input name="isref" type="radio" class="uk-radio" value="yes" />
开启
</td>
</tr>
<tr>
<td>资源下载超时时间：</td>
<td>
<input name="exptime" type="text" class="uk-input uk-form-small uk-form-width-large" id="exptime" value="10" style="width: 120px;" /> 秒
</td>
</tr>
<tr>
<td height="24">引用网址：</td>
<td colspan="3">
<input name="refurl" type="text" class="uk-input uk-form-small uk-form-width-large" id="refurl" value="http://" size="30"/>
（一般为目标网站其中一个文章页的网址）
</td>
</tr>
<tr>
<td width="374"><b>列表网址获取规则</b></td>
<td width="26"></td>
</tr>
<tr>
<td width="18%" height="24">来源属性：</td>
<td>
<input type="radio" class="uk-radio" name="sourcetype" id="source1" value="batch" checked="checked" />
批量生成列表网址 &nbsp;&nbsp;
<input type="radio" class="uk-radio" name="sourcetype" id="source2" value="hand" />
手工指定列表网址 &nbsp;&nbsp;
<input type="radio" class="uk-radio" name="sourcetype" id="source3" value="rss" />
从RSS中获取
</td>
</tr>
<tr id="rssset" style="display:none">
<td height="24">RSS网址：</td>
<td>
<input type="text" class="uk-input uk-form-small uk-form-width-large" name="rssurl" id="rssurl" style="width:350px" value="http://" />
<input type="button" name="btv2" id="btv2" value="测试" onclick="testRss()" />
</td>
</tr>
<tr id="batchset">
<td>批量生成地址设置：</td>
<td >
匹配网址：
<input type="text" class="uk-input uk-form-small uk-form-width-large" name="regxurl" id="regxurl" style="width:350px" value="http://" />
<input type="button" name="btv1" id="btv1" value="测试" onclick="testRegx()" /> <br/>
<span>(如：http://www.dedecms.com/html/test/list_(*).html，如果不能匹配所有网址，可以在手工指定网址的地方输入要追加的网址) </span> <br/>
(*)从
<input type="text" class="uk-input uk-form-small uk-form-width-large" name="startid" id="startid" style="width:90px" value="1" />
到
<input type="text" class="uk-input uk-form-small uk-form-width-large" name="endid" id="endid" style="width:90px" value="" />
(页码或规律数字)&nbsp;
每页递增：
<input type="text" class="uk-input uk-form-small uk-form-width-large" name="addv" id="addv" style="width:90px" value="1" />
<input type="checkbox" name="usemore" class="uk-checkbox" id="usemore" value="1"/>
启用多栏目通配(#)
</td>
</tr>
<tr id='handset' style="display:none">
<td>手工指定网址：<br />
<span>在指定了通配规则后有些不能匹配的网址也可以在这里指定。</span><br /></td>
<td><textarea class="uk-textarea uk-form-small uk-form-width-large" name="addurls" id="addurls" cols="45" rows="5" style="width:80%;height:160px"></textarea></td>
</tr>
<tr id='usemoretr' style="display:none">
<td>多栏目通配规则：<br />
<span>
如果目标网站使用单一模板，可以在匹配网址中用"(#)"表示近似网址的差异，然后在通配规则中设定集合，并且可以指定导出栏目。
</span>
<br />
</td>
<td>
<textarea class="uk-textarea uk-form-small uk-form-width-large" name="batchrule" id="batchrule" cols="45" rows="5" style="width:80%;height:160px"></textarea>
<br /><span style='color:#666666'>格式为：“[(#)=通配字符串; (*)=num-num; typeid=num]换行”
<br />例如：[(#)=>labs/list_3; (*)=>1-25; typeid=>7] 匹配网址：http://www.aaa.com/(#)_(*).html</span>
</td>
</tr>
<tr>
<td ><b>文章网址匹配规则</b></td>
<td></td>
</tr>
<tr>
<td width="22%">区域开始的HTML：</td>
<td width="78%">
<textarea class="uk-textarea uk-form-small uk-form-width-large" name="areastart" id="areastart" cols="45" rows="5" style="width:80%;height:60px"></textarea>
</td>
</tr>
<tr>
<td>区域结束的HTML：</td>
<td>
<textarea class="uk-textarea uk-form-small uk-form-width-large" name="areaend" id="areaend" cols="45" rows="5" style="width:80%;height:60px"></textarea>
</td>
</tr>
<tr>
<td>如果链接中含有图片：</td>
<td>
<input name="listpic" type="radio" class="uk-radio" id="listpic1" value="0" />
不处理 &nbsp;&nbsp;
<input type="radio" class="uk-radio" name="listpic" id="listpic2" value="1" checked="checked" />
采集为缩略图
</td>
</tr>
<tr>
<td>对区域网址进行再次筛选：<br />
(使用正则表达式)</td>
<td>必须包含：
<input type="text" class="uk-input uk-form-small uk-form-width-large" name="musthas" id="musthas" style="width:280px" />
(优先级高于后者)</td>
</tr>
<tr>
<td></td>
<td>不能包含：
<input type="text" class="uk-input uk-form-small uk-form-width-large" name="nothas" id="nothas" style="width:280px" /></td>
</tr>
<!-- /选项 -->
</table>
</div>
</div>
<div class="uk-card-footer " >
<div class="uk-padding-small" >
<button type="submit" class="uk-button uk-button-small uk-button-primary">下一步</button>
</div>
</div>
</div>
</form>
<!-- 列表底部 -->
<div class="bar-bottom uk-flex uk-light uk-flex-right">
<div class="uk-button-group" style="margin-left: 50px;">
</div>
<div class="e1e02">Copyright &copy; 2007-2021 <a href='http://www.dedecms.com' target='_blank'><u>DedeCMS</u></a>, 上海卓卓网络科技有限公司 (DesDev, Inc.)</div>
</div>
<!-- 列表底部 -->
<!-- JS FILES -->
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit-icons.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/jquery/jquery.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/js/dede.manage.min.js"></script>
<script language="javascript">
$(document).ready(function () {
$('#source3').on( "click", function() {
$('#rssset').show();
$('#batchset').hide();
$('#handset').hide();
});
$('#source2').on( "click", function() {
$('#rssset').hide();
$('#batchset').hide();
$('#handset').show();
});
$('#source1').on( "click", function() {
$('#rssset').hide();
$('#batchset').show();
$('#handset').hide();
});
$('#usemore').on( "click", function() {
if ($(this).is(':checked')){
$('#handset').show();
}else{
$('#handset').hide();
}
});
});
</script>
<!-- / JS FILES -->
</body>
</html>
